﻿using System.Xml.Linq;
using unTroublemaker.Conditions;

namespace unTroublemaker.Parsing
{
    public class RegistryConditionParser : ISpecificationParser
    {
        public ISpecificationItem Parse(XElement element, ISpecificationParser genericParser)
        {
            var key = (string) element.Attribute("key");
            var value = (string) element.Attribute("value");

            return new RegistryCondition(key, value);
        }

        public string ElementName { get { return "check-registry"; } }
    }
}
